/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.gov.igac.observatorio.entidades.propuesta;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author jgamba
 */
@Embeddable
public class ParticipantePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "idParticipante")
    private int idParticipante;
    @Basic(optional = false)
    @NotNull
    @Column(name = "Pais_idPais")
    private int paisidPais;

    public ParticipantePK() {
    }

    public ParticipantePK(int idParticipante, int paisidPais) {
        this.idParticipante = idParticipante;
        this.paisidPais = paisidPais;
    }

    public int getIdParticipante() {
        return idParticipante;
    }

    public void setIdParticipante(int idParticipante) {
        this.idParticipante = idParticipante;
    }

    public int getPaisidPais() {
        return paisidPais;
    }

    public void setPaisidPais(int paisidPais) {
        this.paisidPais = paisidPais;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idParticipante;
        hash += (int) paisidPais;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ParticipantePK)) {
            return false;
        }
        ParticipantePK other = (ParticipantePK) object;
        if (this.idParticipante != other.idParticipante) {
            return false;
        }
        if (this.paisidPais != other.paisidPais) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "co.gov.igac.observatorio.entidades.propuesta.ParticipantePK[ idParticipante=" + idParticipante + ", paisidPais=" + paisidPais + " ]";
    }
    
}
